<!-- HTML header for doxygen 1.8.10-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>NATS C Client with Streaming support: Statistics</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;" >
   <div id="projectname">NATS C Client with Streaming support
   &#160;<span id="projectnumber">2.1.0</span>
   </div>
   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__stats_group.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Statistics<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gafa923df029168f4991b77ffdd9e24877"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stats_group.html#gafa923df029168f4991b77ffdd9e24877">natsStatistics_Create</a> (<a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> **newStats)</td></tr>
<tr class="memdesc:gafa923df029168f4991b77ffdd9e24877"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa" title="Statistics of a natsConnection. ">natsStatistics</a> object.  <a href="#gafa923df029168f4991b77ffdd9e24877">More...</a><br /></td></tr>
<tr class="separator:gafa923df029168f4991b77ffdd9e24877"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabe5eaa39f967f8c95ed881c835545de1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stats_group.html#gabe5eaa39f967f8c95ed881c835545de1">natsStatistics_GetCounts</a> (<a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *stats, uint64_t *inMsgs, uint64_t *inBytes, uint64_t *outMsgs, uint64_t *outBytes, uint64_t *reconnects)</td></tr>
<tr class="memdesc:gabe5eaa39f967f8c95ed881c835545de1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extracts the various statistics values.  <a href="#gabe5eaa39f967f8c95ed881c835545de1">More...</a><br /></td></tr>
<tr class="separator:gabe5eaa39f967f8c95ed881c835545de1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga26a04e77af8fc160adf7c33088dcf59c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c">natsStatistics_Destroy</a> (<a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *stats)</td></tr>
<tr class="memdesc:ga26a04e77af8fc160adf7c33088dcf59c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa" title="Statistics of a natsConnection. ">natsStatistics</a> object.  <a href="#ga26a04e77af8fc160adf7c33088dcf59c">More...</a><br /></td></tr>
<tr class="separator:ga26a04e77af8fc160adf7c33088dcf59c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Statistics Functions. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gafa923df029168f4991b77ffdd9e24877"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsStatistics_Create </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> **&#160;</td>
          <td class="paramname"><em>newStats</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Creates a statistics object that can be passed to <a class="el" href="group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec" title="Gets the connection statistics. ">natsConnection_GetStats()</a>.</p>
<dl class="section note"><dt>Note</dt><dd>The object needs to be destroyed when no longer needed.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c" title="Destroys the natsStatistics object. ">natsStatistics_Destroy()</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">newStats</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa" title="Statistics of a natsConnection. ">natsStatistics</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gabe5eaa39f967f8c95ed881c835545de1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsStatistics_GetCounts </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *&#160;</td>
          <td class="paramname"><em>stats</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t *&#160;</td>
          <td class="paramname"><em>inMsgs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t *&#160;</td>
          <td class="paramname"><em>inBytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t *&#160;</td>
          <td class="paramname"><em>outMsgs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t *&#160;</td>
          <td class="paramname"><em>outBytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t *&#160;</td>
          <td class="paramname"><em>reconnects</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Gets the counts out of the statistics object.</p>
<dl class="section note"><dt>Note</dt><dd>You can pass <code>NULL</code> to any of the count your are not interested in getting.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec" title="Gets the connection statistics. ">natsConnection_GetStats()</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stats</td><td>the pointer to the <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa" title="Statistics of a natsConnection. ">natsStatistics</a> object to get the values from. </td></tr>
    <tr><td class="paramname">inMsgs</td><td>total number of inbound messages. </td></tr>
    <tr><td class="paramname">inBytes</td><td>total size (in bytes) of inbound messages. </td></tr>
    <tr><td class="paramname">outMsgs</td><td>total number of outbound messages. </td></tr>
    <tr><td class="paramname">outBytes</td><td>total size (in bytes) of outbound messages. </td></tr>
    <tr><td class="paramname">reconnects</td><td>total number of times the client has reconnected. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga26a04e77af8fc160adf7c33088dcf59c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsStatistics_Destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *&#160;</td>
          <td class="paramname"><em>stats</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroys the statistics object, freeing up memory.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stats</td><td>the pointer to the <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa" title="Statistics of a natsConnection. ">natsStatistics</a> object to destroy. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.10-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
    <a href="http://www.nats.io">
    </a></li>
  </ul>
</div>
</body>
</html>
